<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<style>
    .form-group{
        margin-bottom: 0;
    }
    .invoice-col{
        font-size: 14px;
     }
    .stitle{
        display: inline-block;
        width: 106px;
        margin-bottom: 10px;
    }
    .stitle1{
        display: inline-block;
        width: 88px;
        margin-bottom: 10px;
    }
    .stitle2{
        display: inline-block;
        width: 40px;
        margin-bottom: 10px;
    }

    .scontent{
        margin-left: 20px;
        width: 120px;
    }
    .modal-body{
        border-bottom: 1px solid rgba(0,0,0,.125) ;
    }
</style>
<head th:include="include/head">

</head>

<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">


    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>面试反馈</h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">首页</a></li>
                            <li class="breadcrumb-item active">流程设置</li>
                        </ol>
                    </div>
                </div>
            </div>
            <div  class="row">
                <div class="col-md-5">
                    <div class="row">
                    <div class="col-md-12">
                        <div class="card direct-chat direct-chat-warning">
                            <div class="card-header">
                                <h3 class="card-title">面试信息</h3>
                            </div>
                            <div class="invoice p-3 mb-3">
                                <div class="  row invoice-info">
                                    <div class="col-sm-7 invoice-col"  >
                                    <span class="stitle"> 候选人:  </span> <span class="scontent" th:text="${detail.interview.cname}">张三</span> <br>
                                    <span class="stitle"> 面试项目:</span> <span  class="scontent" th:text="${detail.interview.pname}">张三</span><br>
                                    <span class="stitle"> 面试时间: </span> <span class="scontent"  th:text="${detail.interview.itime}">张三</span>  
                                    <span class="stitle"> 面试时长:</span>   <span class="scontent"  th:text="${detail.interview.length}">张三</span>  
                                    </div>

                                    <div class="col-sm-5 invoice-col">
                                        <span class="stitle1">   基地:</span>     <span class="scontent"  th:text="${detail.interview.bname}">张三</span>    
                                        <span class="stitle1">   面试官: </span>  <span class="scontent"  th:text="${detail.interview.ename}">合肥基地</span>   
                                        <span class="stitle1">   面试得分:</span> <span  class="scontent"  th:text="${detail.interview.score}">80</span>    
                                         <span class="stitle1">  面试结果:</span> <span  class="scontent"  th:text="${detail.interview.state}">通过</span>    

                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                        <div class="col-md-12">
                            <div class="card direct-chat direct-chat-warning">
                                <div class="card-header">
                                    <h3 class="card-title">基本信息</h3>
                                </div>
                                <div class="invoice p-3 mb-3">
                                    <div class="  row invoice-info">
                                        <div class="col-sm-7 invoice-col"  >
                                            <span class="stitle">候选人:</span> <span class="scontent"  th:text="${detail.base.cname}"></span> <br>
                                            <span class="stitle"> 性别:</span>  <span class="scontent"  th:text="${detail.base.cgender}"></span>  <br>
                                            <span class="stitle">手机号: </span> <span class="scontent"  th:text="${detail.base.cmobile}"></span> <br>
                                            <span class="stitle">身份证号:</span> <span class="scontent"  th:text="${detail.base.inumber}"></span> <br>
                                            <span class="stitle">身高(cm):</span>   <span class="scontent"  th:text="${detail.base.cheight}"></span> <br>
                                            <span class="stitle">体重(kg):</span>   <span class="scontent"  th:text="${detail.base.cweight}"></span> <br>
                                            <span class="stitle">出生日期:</span>   <span class="scontent"  th:text="${detail.base.cbirth}"></span><br>
                                            <span class="stitle">签发机关:</span>     <span class="scontent"  th:text="${detail.base.iorgan}"></span><br>
                                            <span class="stitle">籍贯:</span>      <span class="scontent"  th:text="${detail.base.nplace}"></span>  <br>
                                            <span class="stitle">户籍地址:</span>    <span class="scontent"  th:text="${detail.base.iplace}"></span><br>
                                            <span class="stitle">婚姻状况:</span>
                                            <span class="scontent"  th:switch="${detail.base.mstate}">
<!--                                                 //婚姻状况:1.未婚;2.已婚;3.离异;4.丧偶-->
                                                     <span  th:case="1" >未婚</span>
                                                     <span  th:case="2" >已婚</span>
                                                     <span  th:case="3" >离异</span>
                                                     <span  th:case="4" >丧偶</span>
                                            </span> <br>
                                            <span class="stitle">政治面貌:</span>
                                            <span class="scontent"  th:switch="${detail.base.ptype}">
<!--                                                //政治面貌:1.中共党员;2.共青团员;3.民革党员;4.民盟盟员;5.民建会员;6.民进会员;7.无党派人士;8.群众-->
                                                    <span  th:case="1" >中共党员</span>
                                                     <span  th:case="2" >共青团员</span>
                                                     <span  th:case="3" >民革党员</span>
                                                     <span  th:case="4" >民盟盟员</span>
                                                     <span  th:case="5" >民建会员</span>
                                                     <span  th:case="6" >民进会员</span>
                                                     <span  th:case="7" >无党派人士</span>
                                                     <span  th:case="8" >群众</span>
                                            </span> <br>
                                            <span class="stitle">户口性质:</span>
                                            <span class="scontent"  th:switch="${detail.base.rtype}">
<!--                                                //户口性质:1,非农业;2.农业-->
                                                    <span  th:case="1" >非农业</span>
                                                    <span  th:case="2" >农业</span>
                                            </span><br>
                                            <span class="stitle">特长爱好:</span>     <span class="scontent"  th:text="${detail.base.shobby}"></span><br>
                                            <span class="stitle">有无亲属再公司:</span>
                                            <span class="scontent"  th:switch="${detail.base.isrelative}">
<!--                                                有无亲属在公司:0.无;1,有-->
                                                    <span  th:case="0" >无</span>
                                                    <span  th:case="1" >有</span>
                                            </span><br>
                                            <span class="stitle">有无重大疾病:</span>
                                            <span class="scontent"  th:switch="${detail.base.isscik}">
<!--                                                //有无重大疾病:0.无;1,有-->
                                                 <span  th:case="0" >无</span>
                                                    <span  th:case="1" >有</span>
                                            </span> 

                                        </div>

                                        <!-- /.col -->
<!--                                            <span th:text="${detail.base.acheck}"></span><br>-->
                                        <div class="col-sm-5 invoice-col">
                                          <span class="stitle1">    民族:  </span>  <span  class="scontent" th:text="${detail.base.cnation}"></span>  <br>
                                           <span class="stitle2">   邮箱: </span>  <span class="scontent" th:text="${detail.base.cemail}"></span>  <br>
                                           <span class="stitle1">   办公软件:</span>
                                            <span class="scontent" th:switch="${detail.base.slevel}">
<!--                                                /英语水平:1.非常熟悉;2.熟悉3.一般;4不熟悉;5.未使用过-->
                                                    <span  th:case="1" >非常熟悉</span>
                                                    <span  th:case="2" >熟悉</span>
                                                    <span  th:case="3" >一般</span>
                                                    <span  th:case="4" >不熟悉</span>
                                                    <span  th:case="5" >未使用过</span>
                                            </span> <br>
                                          <span class="stitle1">   英语水平: </span>
                                            <span class="scontent" th:switch="${detail.base.elevel}">
<!--                                                /英语水平:1.非常熟悉;2.熟悉3.一般;4不熟悉;5.未使用过-->
                                                    <span  th:case="1" >非常熟悉</span>
                                                    <span  th:case="2" >熟悉</span>
                                                    <span  th:case="3" >一般</span>
                                                    <span  th:case="4" >不熟悉</span>
                                                    <span  th:case="5" >未使用过</span>
                                            </span> 
                                          <span class="stitle1">    微信号: </span>  <span class="scontent" th:text="${detail.base.wxnumber}"></span><br>  <br>
                                           <span class="stitle1">   现居住地: </span>   <span class="scontent" th:text="${detail.base.caddress}"></span><br>  <br>
                                           <span class="stitle1">   人员类别: </span>
                                            <span class="scontent" th:switch="${detail.base.ctype}">
<!--                                                入员类别:1,离职;2.在职;3.在校;4.非在校-->
                                                 <span  th:case="1" >离职</span>
                                                    <span  th:case="2" >在职</span>
                                                    <span  th:case="3" >在校</span>
                                                    <span  th:case="4" >非在校</span>
                                            </span> 
                                           <span class="stitle1">   可到到岗日期:</span>
                                            <span   class="scontent"  th:text="${detail.base.ctime}"></span> 
                                            <span class="stitle1">  紧急联系人:</span>
                                            <span class="scontent" >
                                                <a href="#"  data-toggle="modal" data-target="#contacts-default">查看 </a>
                                            </span>  
                                            <span class="stitle1">  家庭信息: </span>
                                            <span class="scontent" >
                                                <a href="#"  data-toggle="modal" data-target="#families-default">查看 </a>
                                            </span> 
                                            <span class="stitle1">  教育经历:  </span>
                                            <span class="scontent" >
                                                <a href="#"  data-toggle="modal" data-target="#educations-default">查看 </a>
                                            </span> 
                                             <span class="stitle1"> 培训经历: </span>
                                            <span class="scontent" >
                                                <a href="#"  data-toggle="modal" data-target="#trainings-default">查看 </a>
                                            </span> 
                                             <span class="stitle1"> 工作经历: </span>
                                            <span  class="scontent">
                                                <a href="#"  data-toggle="modal" data-target="#works-default">查看 </a>
                                            </span> 
                                            <span class="stitle1">  简历附件: </span>  <br>

                                        </div>
                                        <div class="col-sm-10 invoice-col">


                                    是否同意本公司对您提供的个人信息进行调查核实:
                                            <span class="scontent"  th:switch="${detail.base.acheck}">
<!--                                                //有无重大疾病:0.否;1,是-->
                                                 <span  th:case="0" >否</span>
                                                    <span  th:case="1" >是</span>
                                            </span> 

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--/.direct-chat -->
                        </div>
                    <!-- /.col -->


                    <!-- /.col -->
                </div>
                    <!-- /.row -->
                </div>
                <div class="col-md-4">
                    <div class="row">
                        <div class="col-md-12">
                            <!-- USERS LIST -->
                            <div class="card">
                                    <div class="card-header">
                                    <h3 class="card-title">面试问题</h3>
                                    </div>
                                <div class="card-header">
                                <audio controls   style="width:220px; margin-top: 10px;">
                                    <source th:src="${detail.interview.afile}" type="audio/mpeg" style="width: 200px">
                                    您的浏览器不支持 audio 元素。
                                </audio>
                                </div>
                                <div class="card-body ">



                                    <div class="post"  th:each="bean ,tindex: ${detail.testDatas}">
                                        <div class="col-sm-12">
                                            <span style="display:block;" >[[${tindex.index+1}]].[[${bean.dname}]]
                                            </span>
                                            <span style="float: right">
                                                <a href="#"   th:id="${bean.did}"  onclick="edit(this)" >修改</a></span>
                                            <br>
                                        </div>
                                        <!-- /.user-block -->
                                        <div class="invoice p-3 mb-3"  style="background-color: #cccccc">
                                            <div class="  row invoice-info">
                                                <div class="col-sm-12 "  th:id="'content'+${bean.did}" >
                                                    <span  class="stitle1">  面试评分:</span>  <span th:id="'cdsccore'+${bean.did}">[[${bean.dsccore}]]</span> <br>
                                                    <span  class="stitle1">   面试评价:</span>  <span th:id="'cdevaluate'+${bean.did}">[[${bean.devaluate}]]</span>  <br>
                                                </div>
                                                <div class="col-sm-12 " style="display: none" th:id="'edit'+${bean.did}">
                                                <div class="form-group row">
                                                    <label for="dataName" class="col-sm-3 col-form-label">面试评分:</label>
                                                    <div class="col-sm-8">
                                                       <input TYPE="number" step="0.01"  class="form-control"  th:id="'dsccore'+${bean.did}"  th:value="${bean.dsccore}" >
                                                    </div>
                                                </div>
                                                    <input    type="hidden"    th:id="'did'+${bean.did}"  th:value="${bean.did}" >
                                                    <input    type="hidden"    th:id="'cid'+${bean.did}" th:value="${detail.interview.cid}">
                                                <div class="form-group row">
                                                    <label for="dataName" class="col-sm-3 col-form-label">面试评价:</label>
                                                    <div class="col-sm-8">
                                                        <textarea  class="form-control"  th:id="'devaluate'+${bean.did}"   th:text="${bean.devaluate}" ></textarea>
                                                    </div>
                                                </div>
                                                    <a href="#" style="float: right" th:data="${bean.did}"  onclick="savecontent(this)">保存</a>
                                                </div>

                                            </div>
                                        </div>

                                    </div>

                                    <!-- /.users-list -->
                                </div>
                                <!-- /.card-body -->

                            </div>
                            <!--/.card -->
                        </div>
                    </div>
                    <div class="card">
                        <!-- /.card-header -->
                        <div class="card-body">
                            <div class="form-group row">
                                <label for="dataName" class="col-sm-3 col-form-label">面试结果</label>
                                <div class="col-sm-8">
                                    <select class="form-control"  id="state">
                                        <option value="-1"  th:selected="${detail.interview.intstate}==-1" >未通过</option>
                                        <option value="2"  th:selected="${detail.interview.intstate}==2"> 待确认</option>
                                        <option value="1"  th:selected="${detail.interview.intstate}==1">通过</option>
                                    </select>
<!--                                    <label class="help-block m-b-none" for="dataName"-->
<!--                                           id="dataName-error"><i class="far fa-bell"></i>必填项</label>-->
                                </div>
                            </div>
                            <input    type="hidden"   id="cid" th:value="${detail.interview.cid}">
                            <div class="form-group row">
                                <label for="ctime" class="col-sm-3 col-form-label">到岗日期</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="ctime" required="required"
                                           id="ctime" aria-required="true" th:value="${detail.base.ctime}" >
<!--                                    <label class="help-block m-b-none" for="dataName"-->
<!--                                           id="dataName-error"><i class="far fa-bell"></i>必填项</label>-->
                                </div>
                            </div>
                            <div class="form-group row">
                                <label for="examinerevaluate" class="col-sm-3 col-form-label">综合评价</label>
                                <div class="col-sm-8">
                                    <textarea type="text" class="form-control" name="examinerevaluate" required="required"
                                              id="examinerevaluate" aria-required="true" th:text="${detail.interview.examinerevaluate}" ></textarea>
<!--                                    <label class="help-block m-b-none" for="dataName"-->
<!--                                           id="dataName-error"><i class="far fa-bell"></i>必填项</label>-->
                                </div>
                            </div>
<!--                            <div class="form-group row">-->
                               <a href="javascript:void(0)" style="float: right"  onclick="saveC()">保存</a>
<!--                            </div>-->
                            </div>
                            <!-- /.row -->


                    </div>
                </div>
                <div class="col-md-3">
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"> 事项须知</h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body">
                            <div class="row">
                                <div class="card-body p-0">
                                    <ul class="nav nav-pills flex-column">
                                        <li class="nav-item"  th:each="bean,bindex : ${detail.techDatas}">
                                            <a href="#" class="nav-link">
                                                [[${bindex.index+1}]].[[${bean.dname}]]
                                                <span class="badge bg-primary float-right " data-toggle="modal"  style="margin-left: 10px"   th:data-target="'#tech-default'+${bean.did}" >
                                                    查看
                                               </span>

                                                <span class="badge bg-primary float-right">

                                                    [[${bean.readTime}]]
                                               </span>
                                                <i class="fas fa-eye float-right" style="margin-right: 5px"></i>
                                            </a>
                                        </li>

                                    </ul>
                                </div>

                            </div>
                            <!-- /.row -->
                        </div>

                    </div>
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"> 候选人反馈</h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body">
                            <div class="row">
                                <div class="card-body p-0">
                                    <ul class="nav nav-pills flex-column">

                                        <li class="nav-item active">
                                            <a href="#" class="nav-link">
                                                办公环境
                                                <span class="badge  float-right">
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.orank>=1} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.orank>=2} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.orank>=3} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.orank>=4} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.orank>=5} ? 'text-warning' : 'text-white')}  "></i>
                                                </span>
                                            </a>
                                        </li>
                                        <li class="nav-item active">
                                            <a href="#" class="nav-link">
                                                宿舍环境
                                                <span class="badge  float-right">
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.drank>=1} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.drank>=2} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.drank>=3} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.drank>=4} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.drank>=5} ? 'text-warning' : 'text-white')}  "></i>
                                                </span>
                                            </a>
                                        </li>
                                        <li class="nav-item active">
                                            <a href="#" class="nav-link">
                                                福利待遇
                                                <span class="badge  float-right">
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.srank>=1} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.srank>=2} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.srank>=3} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.srank>=4} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.srank>=5} ? 'text-warning' : 'text-white')}  "></i>
                                                </span>
                                            </a>
                                        </li>
                                        <li class="nav-item active">
                                            <a href="#" class="nav-link">
                                                面试官专业度
                                                <span class="badge float-right">
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.erank>=1} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.erank>=2} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.erank>=3} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.erank>=4} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.erank>=5} ? 'text-warning' : 'text-white')}  "></i>
                                                </span>

                                            </a>
                                        </li>
                                        <li class="nav-item active">
                                            <a href="#" class="nav-link">
                                                面试官专业度
                                                <span class="badge float-right">
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.trank>=1} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.trank>=2} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.trank>=3} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.trank>=4} ? 'text-warning' : 'text-white')}  "></i>
                                                    <i   th:class="'fas fa-star '+@{(${detail.feedback.trank>=5} ? 'text-warning' : 'text-white')}  "></i>
                                                </span>

                                            </a>
                                        </li>

                                    </ul>
                                </div>

                            </div>
                            <!-- /.row -->
                        </div>

                    </div>
                    <!-- /.card -->
                </div>


            </div>
        </section>
<!--        紧急联系人-->
        <div class="modal fade" id="contacts-default">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title">紧急联系人</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body  "  th:each="bean:${detail.base.contacts}">
                        <span> 姓名：[[${bean.coname}]]</span><br>
                        <span> 手机号：[[${bean.comobile}]]</span><br>
                        <span> 关系：[[${bean.corelation}]]</span><br>
                    </div>

                </div>
            </div>
        </div>

        <!--        学历信息-->
        <div class="modal fade" id="educations-default">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title">学历信息</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body  "  th:each="bean:${detail.base.educations}">
                        <span> 姓名：[[${bean.scname}]]</span><br>
                        <span> 关系：[[${bean.detype}]]</span><br>
                        <span> 工作单位：[[${bean.dename}]]</span><br>
                        <span> 职位：[[${bean.stime}]]</span><br>
                        <span> 备注：[[${bean.etime}]]</span><br>
                        <span> 备注：[[${bean.maname}]]</span><br>
                    </div>

                </div>
            </div>
        </div>
        <!--        紧急联系人-->
        <div class="modal fade" id="families-default">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title">家庭信息</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body  "  th:each="bean:${detail.base.families}">
                        <span> 姓名：[[${bean.faname}]]</span><br>
                        <span> 关系：[[${bean.farelation}]]</span><br>
                        <span> 工作单位：[[${bean.fawork}]]</span><br>
                        <span> 职位：[[${bean.faposition}]]</span><br>
                        <span> 备注：[[${bean.fanote}]]</span><br>
                    </div>

                </div>
            </div>
        </div>
        <!--        培训经历-->
        <div class="modal fade" id="trainings-default">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title">培训经历</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body  "  th:each="bean:${detail.base.trainings}">
                        <span> 机构名称：[[${bean.trname}]]</span><br>
                        <span> 培训课程：[[${bean.clname}]]</span><br>
                        <span> 开始时间：[[${bean.stime}]]</span><br>
                        <span> 结束时间：[[${bean.etime}]]</span><br>
                        <span> 证书名称：[[${bean.cename}]]</span><br>
                        <span> 发证机关：[[${bean.ceorgan}]]</span><br>
                    </div>

                </div>
            </div>
        </div>
        <!--        培训经历-->
        <div class="modal fade" id="works-default">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title">工作经历</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body  "  th:each="bean:${detail.base.works}">
                        <span> 公司名称：[[${bean.woname}]]</span><br>
                        <span> 部门名称：[[${bean.dename}]]</span><br>
                        <span> 职位名称：[[${bean.tiname}]]</span><br>
                        <span> 开始时间：[[${bean.stime}]]</span><br>
                        <span> 结束时间：[[${bean.etime}]]</span><br>
                        <span> 薪资：[[${bean.wosalary}]]</span><br>
                        <span> 证明人：[[${bean.cename}]]</span><br>
                        <span> 证明人电话：[[${bean.cemobile}]]</span><br>
                        <span> 离职原因：[[${bean.rereason}]]</span><br>
                    </div>

                </div>
            </div>
        </div>


        <div class="modal fade" th:each="bean:${detail.techDatas}"  th:id="'tech-default'+${bean.did}">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title">事项须知</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body  "  >
                        <div  style="border-bottom: 1px solid rgba(0,0,0,.125) ;margin-bottom: 10px;">
                        <span> 标题：</span><br>
                        <span style="padding-left: 20px;">[[${bean.dname}]]</span><br>
                        <span> 描述：</span><br>
                        <span style="padding-left: 20px;">[[${bean.dtext}]]</span><br>
                        </div>
                        <span> 候选人反馈：</span><br>
                        <input  type="checkbox"  checked  readonly>
                          <span>我已知悉以上内容并同意</span><BR>
                        <div class="invoice p-3 mb-3"  >
                            <span style="padding-left: 20px;">[[${bean.feedback}]]</span>
                        </div>

                    </div>

                </div>
            </div>
        </div>


    </div>
</div>
<!-- ./wrapper -->
<div th:include="include/foot"></div>

<script>
    function  saveC(){
        let  cid=$('#cid').val()
        let  state=$("#state").find("option:selected").val()
        let  ctime=$('#ctime').val()
        let  examinerevaluate=$('#examinerevaluate').val()

        console.log(cid,state,ctime,examinerevaluate)
        $.ajax({
            type: 'POST',
            url: "../candidate/candidate_edit?cid=" + cid+'&state='+state+'&ctime='+ctime+'&examinerevaluate='+examinerevaluate,
            success: function(result){
                console.log(result)
                if (result.stat==10000){
                    layer.msg('修改成功', {icon: 1});
                }
            },error:function(e){
                layer.msg(e.responseText, {icon: 5});
            }

        });
    }
    $("#ctime").datepicker({
        format: 'yyyy-mm-dd ',
        todayBtn: "linked",
        keyboardNavigation: false,
        forceParse: false,
        calendarWeeks: true,
        autoclose: true,
        clearBtn: true,//清除按钮
        minView: 1, //视图展示
    });
    function  savecontent(obj){
        let id=$(obj).attr("data")
        $('#content'+id).show()
        $('#edit'+id).hide()
        $('#'+id).show()
        $('#save'+id).hide()
        let   dsccore  = $('#dsccore'+id).val()
        let   cid  = $('#cid'+id).val()
        let   did  = $('#did'+id).val()
        let devaluate  =  $('#devaluate'+id).text()
        console.log( id,dsccore,devaluate)
        $.ajax({
            type: 'POST',
            url: "../candidate/test_edit?cid=" + cid+'&dsccore='+dsccore+'&devaluate='+devaluate+'&did='+did,
            success: function(result){
                console.log(result)
                if (result.mess=='success'){
                    $('#cdsccore'+id).text(dsccore)
                    $('#cdevaluate'+id).text(devaluate)
                    layer.msg('修改成功', {icon: 1});
                }

            }
        });

    }

    function edit (obj){
        let  id=obj.id
        console.log(obj.id)
        $('#content'+id).hide()
        $('#edit'+id).show()
        $('#'+id).hide()
        $('#save'+id).show()

    }

    $(document).on("click",".fa-plus",function() {
        let   baseId= $('#baseId  option:selected').val()
        var  cno=$("select[name='dId']").length+1;
        console.log(cno)
        if(baseId){
            $.ajax({
                type: 'POST',
                url: "../process/getdata?id=" + baseId,
                success: function(result){
                    console.log(result)
                    let  newcontent='<div class="form-group row"  >'+
                        '<label for="processName" class="col-sm-2 col-form-label">第'+cno+'步</label>\n' +
                        '\t\t\t\t\t\t\t\t<div class="col-sm-8">\n' +
                        '\t\t\t\t\t\t\t\t\t<select  class="form-control"   id="dId'+cno+'" name="dId"  required>\n' +
                        '\t\t\t\t\t\t\t\t\t\t<option value="">请选择</option>\n' +
                        result+
                        '\t\t\t\t\t\t\t\t\t</select>\n' +
                        '\t\t\t\t\t\t\t\t\t<label class="help-block m-b-none" for="dId'+cno+'"\n' +
                        '\t\t\t\t\t\t\t\t\t\t   id="dId'+cno+'-error"><i class="far fa-bell"></i>必填项</label>\n' +
                        '\n' +
                        '\t\t\t\t\t\t\t\t</div>\n' +
                        '\t\t\t\t\t\t\t\t<div class="col-sm-1">\n' +
                        '\t\t\t\t\t\t\t\t\t<i class="fas fa-plus"></i>\n' +
                        '\t\t\t\t\t\t\t\t\t<i class=" fas fa-minus" style="margin-left: 20px;"></i>\n' +
                        '\t\t\t\t\t\t\t\t</div>'+
                        '\t\t\t\t\t\t\t\t</div>'

                    $('#content').append(newcontent)
                }
            });




        }else {
            layer.alert("请选择部门")
        }



    });
    $(document).on("click",".fa-minus",function() {
        var  cno=$("select[name='dId']").length;
        console.log(cno)
        if(cno>1){
            $(this).parent().parent().remove();
        }else {

        }



    });
    $("#addex").click(function(){
        let  id=$('#id').val();
        console.log(id)
        // return;
        layer.open({
            type: 2,
//		        closeBtn:0,
            title: false,
            area: ['50%', '95%'],
            content: 'select_experts?id='+id,
        });
    });
    $("#addPic").click(function(){
        $("#file").click();
    });
    $("#back").click(function() {
        location.href = 'list';
    });
    $("#file").change(function(e){
        if($(this).val()!=''){
            $("#fileupload").ajaxSubmit({
                success:function(e){
                    console.log(e);
                    if(e.res){
                        $('.filediv').each(function(i,e){
                            if(i>0){
                                $(e).remove();
                            }
                        });
                        let filediv= $(".filediv:eq(0)");
                        let filedivclone=filediv.clone(true);
                        filedivclone.find('img').attr('src',e.url);
                        filedivclone.find('input').attr('name','picUrl');
                        filedivclone.find('input').attr('value',e.url);
                        filedivclone.show();
                        filedivclone.appendTo(filediv.parent());
                        $("#file").val("")
                    }

                },error:function(e){
                    layer.msg(e.responseText, {icon: 5});
                }
            });
        }

    });
    // 	var elem = document.querySelector('.js-switch');
    // 	var switchery = new Switchery(elem, { color: '#1AB394' });
    var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
    elems.forEach(function(html) {
        var switchery = new Switchery(html, { color: '#1AB394' });
    });

    $.validator.setDefaults({
        ignore: "",
        highlight : function(a) {
            $(a).removeClass("is-valid").addClass("is-invalid");
        },
        success : function(a) {
            $(a).prev().removeClass("is-invalid").addClass("is-valid");
            $(a).html('<i class="fas fa-check"></i>验证成功');
        },
        errorClass : "help-block m-b-none",
// 			validClass : "help-block m-b-none",
        errorPlacement : function(a, b) {
            if (b.is(":radio") || b.is(":checkbox")) {
                a.appendTo(b.parent().parent().parent())
            } else {
                a.appendTo(b.parent())
            }
        },
        submitHandler:function(form){

            form.submit();
        }
    });
    $.validator.addMethod("checkFile",function(value,element){
        let files=$("input[name='fileurls']");
        if(files.length==0){
            return true;
        }
        return false;
    },"");
    $.validator.addMethod("mobile", function(value, element) {
        var myreg=/^[1][3,4,5,6.7,8,9][0-9]{9}$/;
        var length = value.length;
        return this.optional(element) || (length == 11 && myreg.test(value));
    }, "手机号码格式错误!");
    $("#form").validate(
        {
            ignore : "",
            rules : {
                goodsName : "required",
                doctorPhone: {
                    required:true,
                    mobile:true
                },
                filehidden : {
                    required:true
                },
                attrs : {
                    required:true
                },

            },
            messages : {
                goodsName : '<i class="far fa-times-circle"></i>请输入商品名称',
                filehidden : '<i class="far fa-times-circle"></i>请上传图片',
                attrs : '<i class="far fa-times-circle"></i>请选择关联专家',
            }
        });
    function validaBef(){


        if($("#state3").prop("checked")){
            $("#processState").val("1");
        }else{
            $("#processState").val("0");
        }
        let code=$('.textarea').summernote('code');
        $(".textarea").val(code);
        $("#checkItems").val($('.specsItem:checked').map(function(){return this.value}).get().join(','));
        let file=$("input[name='picUrl']").map(function(){return this.value}).get().join(',');
        $("#filehidden").attr('value',file);
        if ($("input[name='eId']").length>0){
            $("#attrs").attr('value',$("input[name='eId']").length);
        }


        if($("#form").validate()){
            $("#form").submit();
        }

    }
    $(document).ready(function (){
        $("#baseId").change(function (){

            let v=$(this).val();
            let t= $(this).find("option:selected").text();
            if(v>0){
                $("#baseName").val(t);
            }
            $.ajax({url:'../process/dataList',data:"baseId="+v,success:function (data){
                    if(data.res){
                        $("#dId").empty();
                        $("#dId").append("<option value=''>请选择</option>");
                        for(let i=0;i<data.list.length;i++){
                            console.log(data.list[i])
                            $("#dId").append("<option value='"+data.list[i].dataId+"'>"+data.list[i].dataName+"</option>");
                        }

                    }
                }})
        });
        $("#departmentId").change(function (){
            let v=$(this).val();
            let t= $(this).find("option:selected").text();
            console.log(v,t)
            if(v>0){
                $("#departmentName").val(t);
            }

        });
        $("#doctorTitlesId").change(function (){
            let v=$(this).val();
            let t= $(this).find("option:selected").text();
            if(v>0){
                $("#doctorTitlesName").val(t);
            }
        });

    });


</script>
</body>
</html>